package com.zhouyx.userservice.aviator;

import com.googlecode.aviator.AviatorEvaluator;
import com.googlecode.aviator.Expression;

/**
 * @title: Aviator
 * @Author: max.zhou1
 * @Date: 2024/9/4 22:29
 * @Version: 1.0
 **/
// 教程：https://juejin.cn/post/7273032322546647096
public class Aviator {
    public static void main(String[] args)
    {
        Expression expression = AviatorEvaluator.compile("2 * (3 + 5)");
        Long r = (Long) expression.execute();
        System.out.println(r);
    }
}
